package com.woniuxy.cloud.userassembly.utils;
import org.apache.shiro.crypto.hash.SimpleHash;



/**
 * @author:ddd
 * @date:2021/8/22
 * @version:1.0
 **/
public class EnycrptUtils {
    //hash加密算法
    public static final String ALGORITHM_NAME="SHA-256";
    /**
     * 迭代次数
     */
    public  static  final int  ITERATIONS=1;

    public static  String enycrpt(String password){
        SimpleHash simpleHash = new SimpleHash(ALGORITHM_NAME,password);
        simpleHash.setIterations(ITERATIONS);
        return simpleHash.toHex();
    }

}
